package com.vrv.mysqlback;

/**
 * @ClassName: OperatingSystemUtils
 * @Desc: TODO
 * @Auther: <Bang>
 * @Date: 2021/08/27 16:01
 * @Version: 1.0
 * @Modified By:
 */
public class OperatingSystemUtils {


    public static final String WINDOWS = "windows";

    /**
     * 获取操作系统小写名称
     * @return
     */
    public static String getOsLowerCaseName() {
        return System.getProperty("os.name").toLowerCase();
    }

    public static boolean isWindows() {
        boolean isWindows;
        String os = getOsLowerCaseName();
        if (os.contains(WINDOWS)) {
            isWindows = true;
        } else {
            isWindows = false;
        }
        return isWindows;
    }
}
